#include<bits/stdc++.h>
using namespace std;
int mod = 1e9 + 7;
typedef long long ll;
const int maxn = 110;
ll dp[maxn][maxn];
int check[maxn][maxn];
int main() {
    int m, n;
    char str[maxn];
    cin >> n >> m;
    // getchar(); 
    for (int i = 1; i <= n; i++) {
        // getline(cin, str);
        scanf("%s", str + 1);
        for (int j = 1; j <= m; j++) {
            check[i][j] = check[i][j - 1];
            if (str[j] == 'X') check[i][j]++;
        }
    }
    ll ans = 1;
    for (int i = 1; i <= m; i++) {
        for (int j = m; j >= i; j--) {
            if (check[n][j] - check[n][i - 1] == 0) {
                ans ++;
                dp[i][j] = dp[i][j + 1] + dp[i - 1][j] - dp[i - 1][j + 1] + 1;
            }
        }
    }
    for (int i = 1; i <= m; i++) {
        for (int j = m; j >= i; j--) {
            cout<< "[v:" << dp[i][j] << " " << "i:" << i << " j:" << j << "]";
        }
        cout <<endl;
    }
    for (int t = n - 1; t > 0; t--) {
        for (int i = 1; i <= m; i++) {
            for (int j = m; j >= i; j--) {
                if (check[t][j] - check[t][i - 1] == 0) {
                    ans = (ans + dp[i][j]) % mod;
                    cout<< "[v:" << dp[i][j] << " " << "i:" << i << " j:" << j << "]";
                    dp[i][j] = (dp[i][j] + dp[i - 1][j] + dp[i][j + 1] - dp[i - 1][j + 1]) % mod;
                    cout<< "[v:" << dp[i][j] << " " << "i:" << i << " j:" << j << "]" << endl;
                } else dp[i][j] = 0;
            }
        }
    }
    cout << ans << endl;
    return 0;
}